class_name WeaponReloadProgressBar
extends CommonProgressBar

@export var axis_pos_range:Vector2 = Vector2(-14,14)
@onready var axis: Sprite2D = %Axis

func init_pb(duration:float,is_show:bool = true,on_start_action:Callable = Callable(),on_end_action:Callable = Callable()):
	super.init_pb(duration,is_show,on_start_action,on_end_action)
func start():
	super.start()
	axis.position = Vector2(axis_pos_range.x,0)
	tween.tween_callback(func ():on_start.emit())
	tween.tween_property(axis,"position:x",axis_pos_range.y,duration)
	tween.tween_callback(func ():
		on_end.emit()
		end())
func end():
	super.end()
